<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var num = 9.3;
        var a = 7.6;
        /* [2,2,2,1.6,0] */
        /* [2,2,2,2,1.3] */
        var arr = []
        for(var i =0;i<5;i++){
           num = (num-2);
           if(num>2){
               arr.push(2)
           }
           else if(num<0){
               arr.push(0)
           }
           else{
               arr.push(Math.round(num*10)/10)
           }
        }
        console.log(arr)
        /* 
        9.3 -2

        7.3
        5.3
        3.3
        1.3
         */
    </script>
</body>

</html>